<?php
require_once("../resources/commons.php");
require_once("../plugins/extension_plugin.php");

/**
 * Check if the user is allowed to connect (= if he/she is superadmin)
 */
function checkAdminRights(){
    if(SessionManager::getInstance()->checkSession()){
    	if(!SessionManager::getInstance()->isSuperAdmin()){
    		displayError("Protected area");
    	}
    }
}

/**
 * Send an invitation to a user so that he/she could complete his/her registration
 * @param string $p_email the user e-mail address
 * @param string $p_profileUpdateKey the long key for the registration script
 */
function sendInvitation($p_email, $p_profileUpdateKey){
	displayTop("Invitation process",null,null);
	//Call the manageInvitation function of the invitation_plugin.php file.
	//This allow the developer to customize the invitation management function
	manageInvitation($p_email, $p_profileUpdateKey);
	displayBottom();
}

?>